<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: morphdemo</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: morphdemo</td>
      <td class="subheader-left"><a href="matlab:open morphdemo">View code for morphdemo</a></td>
    </tr>
  </table>
<h1>morphdemo</h1><p><span class="helptopic">Demonstrate morphology using animation</span></p><p>
<span style="color:red">morphdemo</span>(<strong>im</strong>, <strong>se</strong>, <strong>options</strong>) displays an animation to show the principles
of the mathematical morphology operations dilation or erosion.  Two
windows are displayed side by side, input binary image on the left and
output image on the right.  The structuring element moves over the input
image and is colored red if the result is zero, else blue.  Pixels in
the output image are initially all grey but change to black or white
as the structuring element moves.

</p>
<p>
<strong>out</strong> = <span style="color:red">morphdemo</span>(<strong>im</strong>, <strong>se</strong>, <strong>options</strong>) as above but returns the output image.

</p>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> 'dilate'</td> <td>Perform morphological dilation</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'erode'</td> <td>Perform morphological erosion</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'delay'</td> <td>Time between animation frames (default 0.5s)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'scale', S</td> <td>Scale factor for output image (default 64)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'movie', M</td> <td>Write image frames to the folder M</td></tr>
</table>
<h2>Notes</h2>
<ul>
  <li>This is meant for small images, say 10x10 pixels.</li>
</ul>
<h2>See also</h2>
<p>
<a href="matlab:doc imorph">imorph</a>, <a href="matlab:doc idilate">idilate</a>, <a href="matlab:doc ierode">ierode</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2012 Peter Corke.</p>
</body></html>